// 获取商品类型列表
import request from '@/utils/request'
export const  producttypeList = (params)=>request({
  url:'/vm-service/skuClass/search',
  params
})
// 新增商品类型
 export const addtype=(data)=>request({
  url:'/vm-service/skuClass',
  method: 'POST',
  data
 })
//  修改商品类型
export const edittype=(classId)=>request({
  url:`/vm-service/skuClass/${classId}`,
  method: 'put',
})
// 删除商品类型
export const deltype = (classId)=>request({
  url:`/vm-service/skuClass/${classId}`,
  method: 'delete',
})
// 查询商品类型
export const searchtype = (params)=>request({
  url:'/vm-service/skuClass/search',
  method: 'get',
  params
})
// 商品管理列表
export const commodity = (params)=>request({
  url:'/vm-service/sku/search?pageIndex=1&pageSize=10',
  params
})
// 商品管理新增
export const addcommodity=(data)=>request({
  url:'/vm-service/sku',
  method: 'POST',
  data
})
// 修改商品
export const editcommidity=(skuId)=>request({
  url:`/vm-service/sku/${skuId}`,
  method: 'put',
})
// 数据导入
export const importstata=(data)=>request({
  url:'/vm-service/sku/upload',
  method: 'post',
  headers:{ "Content-Type": "multipart/form-data" },
  data
})

// 图片上传
export const imgupload = (data)=>request({
  url:'/vm-service/sku/fileUpload',
  method:'post',
  headers:{ "Content-Type": "multipart/form-data" },
  data
})
